package com.dc.entity.ro;

import com.alibaba.fastjson.JSON;
import lombok.Data;

/**
 * 设备回复
 */
@Data
public class LockResponseParams {

    private Integer serviceId;


    private int ack_result;

    public LockResponseParams(Integer serviceId, int ack_result) {
        this.serviceId = serviceId;
        this.ack_result = ack_result;
    }

    public static String ok(Integer serviceId) {
        return JSON.toJSONString(serviceId, 200);
    }

    public static String fail() {
        return JSON.toJSONString(new LockResponseParams(9001, 100));
    }

    public static String getTopic(String id) {
        return "/xxxxxx/" + id + "/xxxxx";
    }
}
